<template>
  <div>
    <el-image :src="src" class="img-container">
        <div slot="error">
            <img src="./tx.jpg" alt="">
        </div>
    </el-image>
  </div>
</template>

<script>
export default {
    // 接收父传子数据
    props:{
        src:{
            type: null,
            required:true
        }
    }
}
</script>

<style scoped lang="scss" >
    .img-container{
        border-radius:50%;
        ::v-deep img{
            width: 80px;
            height: 80px;
        }
    }
</style>